﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Gallery.aspx.vb" Inherits="Universities.Gallery" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<br />
<fieldset>
<legend>Upload Photos to Gallery</legend>
    Description:<br />
    <asp:TextBox ID="txtB_Description" runat="server" Height="91px" 
        TextMode="MultiLine" Width="322px"></asp:TextBox>
    <br />
 <asp:FileUpload ID="ful_browse" runat="server" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Button ID="btn_upload_image" runat="server" Text="Submit" />
</fieldset>
   
    <br />

<br />
<div>
    <asp:DataList ID="DataList1" runat="server" RepeatColumns="4" RepeatLayout="Table" Width = "500px" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <br />
            <table cellpadding = "5px" cellspacing = "0">
            <tr>
                <td>
                   <a href='ImageZoom.aspx?GID=<%# Eval("ID")%>&UID=<%# Eval("UniversityID")%>' > <asp:Image ID ="Image1" runat="server" ImageUrl = '<%# Eval("Photos")%>' 
                    Width = "200px" Height = "200px"/></a>
                </td>
            </tr>
            </table>
            <br /> 
        </ItemTemplate> 
    </asp:DataList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:UniConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:UniConnectionString.ProviderName %>" 
        SelectCommand="SELECT * FROM [Gallery] WHERE ([UniversityID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="UniversityID" QueryStringField="UID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    </div>
    <div id="divBackground" class="modal">
</div>

    <br />
    </asp:Content>
